avd_name = sys.argv[2]
result_file = sys.argv[3].replace('\\','/')

def write_result(result_file, step, result):
    fd=open(result_file, "a")
    fd.write(step + ";" + result + "\n")
    fd.close()

switchApp('5554:' + avd_name)
type("1360775478697.png", 'andavdtest')
            

type("1360775510286.png", 'test123')
type(Key.ESC)
type(Key.F2)
click("1360772996008.png")
sleep(10)
if exists("1360773052217.png"):
    write_result(result_file, "app_login", "OK")
else:
    print result_file + "  FAIL"
    write_result(result_file, "app_login", "FAILED")

#fd=open(result_file, "a")
#fd.write("app_start;OK\n")
#fd.close()
            

            
            